filechooserwidget: Fold function into only caller
authorTimm Bäder <mail@baedert.org>
Wed, 19 Feb 2020 08:18:25 +0000 (09:18 +0100)
committerTimm Bäder <mail@baedert.org>
Thu, 20 Feb 2020 09:23:09 +0000 (10:23 +0100)
gtk/gtkfilechooserwidget.c

index 546b32d62a8039a4d1c6d6973b75aa38323c0a18..265f5de88d09cb46d791c570b67b7e5b2703f106 100644 (file)
@@ -2103,19 +2103,6 @@ static GActionEntry entries[] = {
   { "toggle-sort-dirs-first", NULL, NULL, "false", change_sort_directories_first_state }
 };
 
-static void
-add_actions (GtkFileChooserWidget *impl)
-{
-  GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (impl);
-
-  priv->item_actions = G_ACTION_GROUP (g_simple_action_group_new ());
-  g_action_map_add_action_entries (G_ACTION_MAP (priv->item_actions),
-                                   entries, G_N_ELEMENTS (entries),
-                                   impl);
-  gtk_widget_insert_action_group (GTK_WIDGET (priv->browse_files_tree_view), "item",
-                                  priv->item_actions);
-}
-
 static void
 file_list_build_popover (GtkFileChooserWidget *impl)
 {
@@ -8408,7 +8395,12 @@ post_process_ui (GtkFileChooserWidget *impl)
   gtk_popover_set_default_widget (GTK_POPOVER (priv->rename_file_popover), priv->rename_file_rename_button);
   gtk_popover_set_relative_to (GTK_POPOVER (priv->rename_file_popover), priv->browse_files_tree_view);
 
-  add_actions (impl);
+  priv->item_actions = G_ACTION_GROUP (g_simple_action_group_new ());
+  g_action_map_add_action_entries (G_ACTION_MAP (priv->item_actions),
+                                   entries, G_N_ELEMENTS (entries),
+                                   impl);
+  gtk_widget_insert_action_group (GTK_WIDGET (priv->browse_files_tree_view), "item",
+                                  priv->item_actions);
 
   gtk_search_entry_set_key_capture_widget (GTK_SEARCH_ENTRY (priv->search_entry), priv->search_entry);
 }